import org.junit.Assert;
import org.junit.Test;
import someclass.showMenuOptionList;

public class testShowMenuOptionList {
    @Test
    public void show_menu_option_list_when_started(){
        showMenuOptionList menuList = new showMenuOptionList();
        Assert.assertEquals("1.Membership details 2.BookList 3.Reserve Book 4.MovieDetails ", menuList.show());
    }

    @Test
    public void could_select_option(){
        showMenuOptionList selectReserveBook = new showMenuOptionList();
        selectReserveBook.select(3);
        Assert.assertEquals(selectReserveBook.couldReserveBook,true);
    }
    @Test
    public void should_print_message_when_choose_membership_details() {
        showMenuOptionList membershipDetails = new showMenuOptionList();
        Assert.assertEquals("Please talk to a Librarian. Thank you",membershipDetails.select(1));
    }

    @Test
    public void should_show_message_when_choose_show_movie_details(){
        showMenuOptionList selectMovieDetails = new showMenuOptionList();
        selectMovieDetails.select(4);
        Assert.assertEquals(selectMovieDetails.showMovieDetails,true);
    }
    @Test
    public void should_throw_exception_when_option_not_valid(){
        showMenuOptionList selectWrong = new showMenuOptionList();
        Assert.assertEquals("Select a valid option!!",selectWrong.select(5));
    }
}
